package com.solve.auth.dao;

import com.solve.auth.entity.ManagerInfo;
import com.solve.auth.entity.User;
import com.solve.auth.entity.UserExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    int countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(String uuid);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(String uuid);

    User selectByName(@Param("userName") String userName);

    ManagerInfo selectByNameGetManager(@Param("userName") String userName);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectUserAllInfo(String uuid);

    int reduceUserIntegral(@Param("integral") Integer integral, @Param("userId") String userId);

    int addUserIntegral(@Param("integral") Integer integral, @Param("userId") String userId);
}